import { Suspense } from 'react'
import { useRoutes } from 'react-router-dom'
import { Spin } from 'antd'
import './App.scss'
// 导入路由规则
import routes from './router'

function App() {
  const ele = useRoutes(routes)
  return (
    <div className="app">
      <Suspense
        fallback={
          <div className="loading">
            <Spin size="large" tip="玩命加载中..." />
          </div>
        }
      >
        {ele}
      </Suspense>
    </div>
  )
}

export default App
